<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Wopop</title>
    <link href="{{asset('modality/css/style.css')}}" rel="stylesheet" type="text/css">
</head>

<body class="login">
<div class="login_m" style="margin-top: 150px;">

    <div class="login_boder">
        <div class="login_padding">
            <form action="/login/login" method="post">
                <input type="hidden" name="_token" value="{{csrf_token()}}">
                <h2>用户名</h2>
                <label>
                    <input type="text" name="login_name" class="txt_input txt_input2" placeholder="Your name">
                </label>
                <h2>密码</h2>
                <label>
                    <input type="password" name="login_pwd" id="userpwd" class="txt_input" placeholder="******">
                </label>
                <h2>验证码</h2>
                <label>
                    <input type="text" id="yzm" class="txt_input3" placeholder="******" name="code">
                    <img src="{{URL('login/getCheckCode')}}" id="checkcodeimg" class="radius"><a id="kanbuq" href="javascript:;" onClick="againCode()">换一张</a>
                </label>
                <div class="rem_sub">

                    <label>
                        <input type="submit" class="sub_button" id="button" value="登录" style="opacity: 0.7;">
                    </label>
                </div>
            </form>
        </div>
    </div><!--login_boder end-->
</div><!--login_m end-->
</body>
<script type="text/javascript" src="{{asset('modality/js/jquery-1.8.3.min.js')}}"></script>
<script type="text/javascript">
    function againCode(){
        $.ajax({
            url: '/login/getCheckCode',
            type: 'GET',
            success: function(data){
                if(data){
                    var urls =$('#checkcodeimg').attr('src');
                    $("#checkcodeimg").attr('src', urls);
                }else{
                    alert("获取验证码失败！");
                }
            }
        })
    }
</script>
</html>